﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BusinessService.Plugin.Const
{
    /// <summary>
    /// 匹配规则
    /// </summary>
    public class Match
    {
        /// <summary>
        /// 符号判断
        /// </summary>
        /// <param name="judgingSymbols"></param>
        /// <returns></returns>
        public static ConditionalType JudgeChanged(string judgingSymbols)
        {
            switch (judgingSymbols)
            {
                case "=": return ConditionalType.Equal;
                case "!=": return ConditionalType.NoEqual;
                case ">": return ConditionalType.GreaterThan;
                case ">=": return ConditionalType.GreaterThanOrEqual;
                case "<": return ConditionalType.LessThan;
                case "<=": return ConditionalType.LessThanOrEqual;
                default:
                    return ConditionalType.Equal;
            }
        }
        /// <summary>
        /// 逻辑判断
        /// </summary>
        /// <param name="judgingSymbols"></param>
        /// <returns></returns>
        public static dynamic LogicChanged(string judgingSymbols)
        {
            switch (judgingSymbols)
            {
                case "And": return 0;
                case "Or": return 1;
                default:
                    return 0;
            }
        }
        /// <summary>
        /// 类型选择
        /// </summary>
        public static List<string> Character { get; set; } = new List<string>()
    {
        "string",
        "int",
        "long",
        "double",
        "decimal",
        "bool"
    };
    }
    //public enum ConditionalType
    //{
    //    Equal,//相等
    //    Like,//模糊查询
    //    GreaterThan,//大于
    //    GreaterThanOrEqual,//大于等于
    //    LessThan,//小于
    //    LessThanOrEqual,//小于等于
    //    In,
    //    NotIn,
    //    LikeLeft,
    //    LikeRight,
    //    NoEqual,//不等于
    //    IsNullOrEmpty,
    //    IsNot,
    //    NoLike,
    //    EqualNull,
    //    InLike,
    //    Range
    //}
}
